package com.baizhi.global;

import com.baizhi.vo.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author yu
 */
/*全局异常处理类*/
//@RestControllerAdvice
public class GlobalExceptionSolve {
//    @ExceptionHandler(RuntimeException.class)
    public R solveRuntimeException(Exception e){
        String message = e.getMessage();
        return R.error(500,message);
    }
}
